package com.yuuko.yuukoapi.project.limb.doman.entity

import com.yuuko.yuukoapi.common.utils.UUIDGenerator
import com.yuuko.yuukoapi.model.base.BaseEntity
import org.babyfish.jimmer.sql.Entity
import org.babyfish.jimmer.sql.GeneratedValue
import org.babyfish.jimmer.sql.Id
import org.babyfish.jimmer.sql.IdView
import org.babyfish.jimmer.sql.JoinColumn
import org.babyfish.jimmer.sql.Key
import org.babyfish.jimmer.sql.ManyToOne
import org.babyfish.jimmer.sql.Table

/**
 * <p>
 *  device

 * </p>
 *
 * @author yuuko
 * @date 2025-06-23
 */
@Entity
@Table(name = "device")
interface Device : BaseEntity {

    /**
     *  id

     */
    @Id
    @GeneratedValue(generatorType = UUIDGenerator::class)
    val id: String

    /**
     *  model_id

     */
    @IdView("model")
    val modelId: String

    /**
     *  name

     */
    val name: String

    /**
     *  code

     */
    @Key
    val code: String?

    /**
     *  type

     */
    val type: String?

    /**
     *  description

     */
    val description: String?

    @ManyToOne
    @JoinColumn(name = "model_id")
    val model: DeviceModel

}